package com.example.domain.entity;

import javax.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 计量单位实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "units")
public class Unit extends BaseEntity {

    @Id
    @Column(name = "code", length = 20)
    private String code;

    @Column(name = "name", length = 50, nullable = false)
    private String name;

    @Column(name = "description", length = 100)
    private String description;
}

